package top.linuyx.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.linuyx.mapper.RoleMapper;
import top.linuyx.service.RoleService;

import java.util.List;

/**
 * @Author Linuyx
 * @Description RoleService实现类 处理:查询角色等业务
 * @Date Created in 2021-04-09 19:26
 */

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    /**
     * 根据用户名查询角色
     *
     * @param username 用户名
     * @return 角色集合
     */
    @Override
    public List<String> listRoleByUsername(String username) {
        return roleMapper.listRoleByUsername(username);
    }

}
